<template>
  <div>
    <div class="processstyle">
      <CCard>
        <CCardBody>
          <div class="mapDiv">
            <div class="dpMapQueryControllWrapper">
              <div id="dataQueryDqmap" class="MapStyle" ref="themap"></div>
              <div>
                <CButton
                  v-on:click="sideBarBlock = !sideBarBlock"
                  color="info"
                  style="
                    position: absolute;
                    left: 23.7%;
                    top: 4%;
                    background-color: #2d8cf0;
                  "
                  v-if="sideBarBlock == true"
                >
                  <img
                    class="featuresstyle"
                    src="@/assets/icons/showhide.png"
                    alt
                  />
                </CButton>
                <CButton
                  v-on:click="sideBarBlock = !sideBarBlock"
                  color="info"
                  style="position: absolute; top: 4%; background-color: #2d8cf0"
                  v-if="sideBarBlock == false"
                >
                  <img
                    class="featuresstyle"
                    src="@/assets/icons/showhide.png"
                    alt
                  />
                </CButton>
                <transition name="fade">
                  <div
                    v-if="sideBarBlock"
                    v-show="sideBarBlock"
                    class="timeselect"
                  >
                    <CCol span="12" class="demo-tabs-style1">
                      <Tabs
                        type="card"
                        style="position: relative; left: -14px; width: 106%"
                        :value="TabName"
                        v-model="TabName"
                      >
                        <TabPane
                          label="查询条件"
                          style="
                            height: calc(100vh - 180px);
                            overflow-y: auto;
                            overflow-x: hidden;
                          "
                          name="QueryData"
                        >
                          <div class="spatial-region-wrapper1">
                            <CCol class="task-monitor-col">
                              <CRow class="task-monitorTable-row">
                                <CButton
                                  color="info"
                                  class="btn"
                                  @click="regionOperator"
                                  style="background-color: #2d8cf0"
                                  >区划</CButton
                                >
                                <CButton
                                  color="info"
                                  class="btn"
                                  @click="importantRegionOperator"
                                  style="
                                    position: relative;
                                    left: 10px;
                                    background-color: #2d8cf0;
                                  "
                                  >重点区域</CButton
                                >
                                <div v-show="regionBlock" class="regionBlock">
                                  <div>
                                    <span
                                      style="
                                        position: relative;
                                        top: 8px;
                                        font-weight: 600;
                                        font-size: 15px;
                                        color: black;
                                      "
                                      >省/市/自治区:</span
                                    >
                                    <Cascader
                                      v-model="provinceArray"
                                      :data="provinceRegionCascader"
                                      class="regionCas"
                                      trigger="click"
                                      @on-change="
                                        provinceRegionChangeEvent($event)
                                      "
                                      style="
                                        position: relative;
                                        top: -19px;
                                        left: 110px;
                                      "
                                    ></Cascader>
                                    <span
                                      style="
                                        position: relative;
                                        font-weight: 600;
                                        font-size: 15px;
                                        color: black;
                                      "
                                      >地级市/州/盟:</span
                                    >
                                    <Cascader
                                      v-model="cityArray"
                                      v-bind:disabled="isCity"
                                      :data="cityRegionCascader"
                                      class="regionCas"
                                      trigger="click"
                                      @on-change="cityRegionChangeEvent($event)"
                                      style="
                                        position: relative;
                                        top: -26px;
                                        left: 110px;
                                      "
                                    ></Cascader>
                                    <span
                                      style="
                                        position: relative;
                                        font-weight: 600;
                                        font-size: 15px;
                                        color: black;
                                      "
                                      >区/县级市/县:</span
                                    >
                                    <Cascader
                                      v-model="countyArray"
                                      v-bind:disabled="isCounty"
                                      :data="countyRegionCascader"
                                      class="regionCas"
                                      trigger="click"
                                      @on-change="
                                        countyRegionChangeEvent($event)
                                      "
                                      style="
                                        position: relative;
                                        top: -29px;
                                        left: 110px;
                                      "
                                    ></Cascader>
                                  </div>
                                </div>

                                <div
                                  v-show="importantRegionBlock"
                                  class="regionBlock"
                                >
                                  <div>
                                    <span
                                      style="
                                        font-weight: 600;
                                        font-size: 15px;
                                        color: black;
                                        position: relative;
                                      "
                                      >重点区域:</span
                                    >
                                    <Cascader
                                      :data="importantRegionCascader"
                                      change-on-select
                                      filterable
                                      class="regionCas"
                                      @on-change="importRegionChangeEvent"
                                      style="
                                        position: relative;
                                        top: -30px;
                                        left: 79px;
                                      "
                                    ></Cascader>
                                  </div>
                                </div>
                              </CRow>
                              <CRow
                                class="TimeSelect"
                                style="position: relative; left: 10px"
                              >
                                <Divider
                                  orientation="left"
                                  style="
                                    color: black;
                                    font-weight: bold;
                                    position: relative;
                                    left: -10px;
                                  "
                                  >查询采集时间</Divider
                                >
                                <div class="startStutes layout">
                                  <label
                                    class="labelName"
                                    style="
                                      color: black;
                                      font-weight: 500;
                                      font-size: 14px;
                                    "
                                    >开始日期</label
                                  >
                                  <DatePicker
                                    type="date"
                                    placeholder="请选择开始日期"
                                    v-model="startDate"
                                    class="pickstyle"
                                    @on-change="onStartTimeChange"
                                    :options="startTimeOption"
                                    :editable="false"
                                    style="position: relative; left: 5px"
                                  ></DatePicker>
                                </div>
                                <div class="endDateBtn layout">
                                  <label
                                    class="labelName"
                                    style="
                                      width: 60px;
                                      color: black;
                                      font-weight: 500;
                                      font-size: 14px;
                                    "
                                    >结束日期</label
                                  >
                                  <DatePicker
                                    type="date"
                                    placeholder="请选择结束日期"
                                    v-model="endDate"
                                    class="pickstyle"
                                    @on-change="onEndTimeChange"
                                    :options="endTimeOption"
                                    :editable="false"
                                  ></DatePicker>
                                </div>
                              </CRow>
                              <CRow>
                                <Form style="width: 100%">
                                  <FormItem label="数据优选">
                                    <i-switch
                                      :value="isDataOptimization"
                                      size="large"
                                      @on-change="changeDataOptimization"
                                    >
                                      <span slot="open"></span>
                                      <span slot="close"></span>
                                    </i-switch>
                                  </FormItem>
                                </Form>
                              </CRow>
                              <CRow
                                class="TimeSelect"
                                style="
                                  position: relative;
                                  left: 10px;
                                  flex-direction: column;
                                "
                              >
                                <Divider
                                  orientation="left"
                                  style="
                                    color: black;
                                    font-weight: bold;
                                    position: relative;
                                    left: -10px;
                                    margin-bottom: 40px;
                                  "
                                  >传感器</Divider
                                >
                                <div
                                  style="
                                    border: 0px solid rgb(241, 244, 249);
                                    border-radius: 5px;
                                    position: relative;
                                    width: 450px;
                                    background: rgb(247 239 239 / 0.8);
                                  "
                                >
                                  <div
                                    @click="sensorGFDropdown"
                                    class="cinputselectstyle"
                                    style="font-size: 14px"
                                  >
                                    <img
                                      class="imagestyle"
                                      src="../../../public/img/下拉选择.png"
                                      alt
                                    />
                                    高分系列
                                  </div>
                                  <div
                                    v-show="GFSensorSelectShow"
                                    class="cinputstyle"
                                    style="background: white"
                                  >
                                    <CRow
                                      style="
                                        margin-top: 10px;
                                        margin-left: 10px;
                                      "
                                    >
                                      <CCol sm="5">
                                        <span>GF1:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in GF1List"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeGF1Input(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span>GF2:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in GF2List"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeGF2Input(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span>GF3:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in GF3List"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeGF3Input(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span>GF4:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in GF4List"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeGF4Input(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span>GF1B:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in GF1BList"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeGF1BInput(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span>GF1C:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in GF1CList"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeGF1CInput(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span>GF1D:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in GF1DList"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeGF1DInput(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span>GF5:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in GF5List"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeGF5Input(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span>GF6:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in GF6List"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeGF6Input(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>

                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span style="margin-top: 0.5rem"
                                          >BJ2:</span
                                        >
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in BJ2List"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeBJ2Input(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                  </div>
                                </div>

                                <!-- 资源系列 -->
                                <div
                                  style="
                                    border: 0px solid rgb(241, 244, 249);
                                    border-radius: 5px;
                                    position: relative;
                                    width: 450px;
                                    background: rgb(247 239 239 / 0.8);
                                    font-size: 14px;
                                  "
                                >
                                  <div
                                    @click="sensorZYDropdown"
                                    class="cinputselectstyle"
                                  >
                                    <img
                                      class="imagestyle"
                                      src="../../../public/img/下拉选择.png"
                                      alt
                                    />
                                    资源系列
                                  </div>
                                  <div
                                    v-show="ZYsensorSelectShow"
                                    class="cinputstyle"
                                    style="background: white"
                                  >
                                    <CRow
                                      style="
                                        margin-top: 10px;
                                        margin-left: 10px;
                                      "
                                    >
                                      <CCol sm="5">
                                        <span>ZY02C:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in ZY02CList"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeZY02CInput(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span>CBERS04:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in ZY3List"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeZY3Input(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span style="margin-top: 0.5rem"
                                          >ZY03:</span
                                        >
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in ZY302List"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeZY302Input(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                  </div>
                                </div>

                                <!-- 环境减灾系列 -->
                                <div
                                  style="
                                    border: 0px solid rgb(241, 244, 249);
                                    border-radius: 5px;
                                    position: relative;
                                    width: 450px;
                                    background: rgb(247 239 239 / 0.8);
                                    font-size: 14px;
                                  "
                                >
                                  <div
                                    @click="sensorHJJZDropdown"
                                    class="cinputselectstyle"
                                  >
                                    <img
                                      class="imagestyle"
                                      src="../../../public/img/下拉选择.png"
                                      alt
                                    />
                                    环境减灾系列
                                  </div>
                                  <div
                                    v-show="HJsensorSelectShow"
                                    class="cinputstyle"
                                    style="background: white"
                                  >
                                    <CRow
                                      style="
                                        margin-top: 10px;
                                        margin-left: 10px;
                                      "
                                    >
                                      <CCol sm="5">
                                        <span>HJ2A:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in HJ2AList"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeHJ2AInput(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span>HJ1B:</span>
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in HJ1BList"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeHJ1BInput(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span style="margin-top: 0.5rem"
                                          >HJ2B:</span
                                        >
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in HJ2BList"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeHJ2BInput(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span style="margin-top: 0.5rem"
                                          >HJ1A:</span
                                        >
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in HJ1AList"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeHJ1AInput(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                    <CRow style="margin-left: 10px">
                                      <CCol sm="5">
                                        <span style="margin-top: 0.5rem"
                                          >HJ1C:</span
                                        >
                                      </CCol>
                                      <CCol>
                                        <CInputCheckbox
                                          v-for="(item, index) in HJ1CList"
                                          :key="index"
                                          type="radio"
                                          :label="item.label"
                                          :value="item.value"
                                          :checked.sync="item.isCheck"
                                          @change="changeHJ1CInput(index)"
                                          class="inputRadio"
                                        />
                                      </CCol>
                                    </CRow>
                                  </div>
                                </div>
                                <!-- 环境减灾系列 -->

                                <div>
                                  <label
                                    class="label"
                                    style="position: relative; top: 35px"
                                    >产品级别</label
                                  >
                                  <CSelect
                                    horizontal
                                    :options="productLevelList"
                                    :value.sync="productLevel"
                                    placeholder="请选择产品级别"
                                    @change="selectProductLevel($event)"
                                    class="input"
                                    style="
                                      position: relative;
                                      left: 70px;
                                      width: 200px;
                                    "
                                  />
                                </div>

                                <div
                                  style="
                                    position: relative;
                                    margin-top: -20px;
                                    top: -9px;
                                  "
                                >
                                  <span>云量:</span>
                                  <Slider
                                    v-model="cloudPercent"
                                    show-input
                                    class="cloudPercent"
                                    style="
                                      display: inline-block;
                                      width: 60%;
                                      top: 10px;
                                      position: relative;
                                      left: 10px;
                                    "
                                  ></Slider>
                                </div>

                                <div>
                                  <Button type="primary" @click="dataQuery"
                                    >数据查询</Button
                                  >
                                </div>
                              </CRow>
                            </CCol>
                          </div>
                        </TabPane>
                        <TabPane
                          label="查询结果"
                          style="
                            height: calc(100vh - 180px);
                            overflow-y: auto;
                            overflow-x: hidden;
                          "
                          name="QueryResult"
                        >
                          <CRow>
                            <Button
                              type="primary"
                              @click="reportGeneration"
                              style="position: relative; margin-left: 20px"
                              >生成报告</Button
                            >
                            <Button
                              type="primary"
                              @click="selectWorkFlow"
                              style="position: relative; margin-left: 10px"
                              >流程选择</Button
                            >
                            <Button
                              type="primary"
                              @click="dataCopy"
                              style="position: relative; margin-left: 10px"
                              >数据拷贝</Button
                            >
                          </CRow>
                          <div
                            class="next-content"
                            style="background: white; margin-top: 10px"
                          >
                            <Table
                              ref="selectionData"
                              border
                              :columns="getColumnData"
                              :data="dataTable"
                              @on-selection-change="onselectionchange($event)"
                            >
                              <!--插入图片链接的代码-->
                              <template slot="scope" slot-scope="{ row }">
                                <img
                                  :src="getimgPath(row.tumbUrl)"
                                  alt
                                  style="width: 30px; height: 30px"
                                  @click="tumbInfoClicked(row)"
                                />
                              </template>

                              <template slot="action"></template>
                            </Table>
                          </div>
                          <CCardFooter class="page-link">
                            <CRow>
                              <CCol class="footerPage" style>
                                <span class="pageContent">
                                  每页
                                  <CSelect
                                    @change="getVendorId($event)"
                                    :options="[10, 15, 20, 25, 100]"
                                    v-model="pageSize"
                                    class="selectStyle"
                                    style
                                  />
                                  条记录。第{{ this.currentPage }}页(总共{{
                                    this.total
                                  }}页，{{ this.allNum }}条记录)
                                </span>
                                <CPagination
                                  :activePage.sync="currentPage"
                                  :pages="total"
                                  align="end"
                                  v-if="total != 0"
                                />
                              </CCol>
                            </CRow>
                          </CCardFooter>
                        </TabPane>
                      </Tabs>
                    </CCol>
                  </div>
                </transition>
              </div>
            </div>
          </div>
        </CCardBody>
      </CCard>
      <Spin fix v-show="this.isSpinShow">
        <!-- <div class="demo-spin-icon-load">
            <i class="iconfont icon-loader--line"></i>
        </div>-->
        <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
        <!-- <Icon type="load-c" size="30" class="demo-spin-icon-load"></Icon> -->
        <div style="font-size: 16px">获取数据中...</div>
      </Spin>
      <Spin fix v-if="isLoading">
        <Icon type="ios-loading" size="80" class="demo-spin-icon-load"></Icon>
        <div>{{ loadingText }}</div>
      </Spin>
    </div>
    <CModal
      title="推送任务选择目录"
      color="info"
      :show.sync="showPushTaskZtreeModal"
      :closeOnBackdrop="false"
      size="lg"
      centered
    >
      <div class="treeDiv">
        <ul id="pushTaskTree" class="ztree"></ul>
      </div>

      <template #header>
        <h5>选择目录</h5>
        <CButtonClose @click="pushTaskMenuCancel" />
      </template>
      <template #footer>
        <CButton
          @click="menuSaveAs"
          color="info"
          title="点击文件夹即可，不需要打钩选中哦~"
          >另存为</CButton
        >
        <CButton @click="pushTaskMenuOk" color="info">确定</CButton>
        <CButton @click="pushTaskMenuCancel" color="light">取消</CButton>
      </template>
    </CModal>
    <CModal
      title="新增"
      color="info"
      :show.sync="saveAsModal"
      :closeOnBackdrop="false"
      size="sm"
      centered
    >
      <template #header>
        <h6>新增</h6>
        <CButtonClose @click="saveAsFileCancel" class="text-white" />
      </template>
      <div class="saveFile">
        <CInput
          label="文件:"
          class="saveFileStyle"
          horizontal
          v-model="newFileName"
        />
      </div>
      <!-- <div class="saveFolder">
        <CInput
          label="文件夹:"
          class="saveFileStyle"
          horizontal
          v-model="newFileName"
        />
      </div>-->
      <template #footer>
        <CButton @click="saveAsFileOK" color="info">确定</CButton>
        <CButton @click="saveAsFileCancel" color="info">取消</CButton>
      </template>
    </CModal>
    <CModal
      title="流程执行"
      color="info"
      :show.sync="SelectWorkFlowModal"
      size="lg"
      centered
      :closeOnBackdrop="false"
    >
      <CRow style="display: float">
        <label class="label" style="position: relative; left: 9px; top: 15px"
          >流程选择</label
        >
        <Select
          v-model="selectFlowID"
          filterable
          transfer
          @on-select="processingOnChange"
          style="width: 55%; margin-left: 22px; margin-top: 6px"
        >
          <Option
            v-for="item in processingList"
            :value="item.flowId"
            :key="item.flowId"
            >{{ item.flowName + "-" + item.flowId }}</Option
          >
        </Select>
      </CRow>
      <template #header>
        <h5>流程执行</h5>
        <CButtonClose @click="SelectWorkFlowCancel" />
      </template>
      <template #footer>
        <CButton @click="SelectWorkFlowOk" color="info">确定</CButton>
        <CButton @click="SelectWorkFlowCancel" color="light">取消</CButton>
      </template>
    </CModal>
    <!-- <CModal
      title="选择数据导出目录"
      color="info"
      :show.sync="dataExportZtreeModal"
      :closeOnBackdrop="false"
      size="lg"
      centered
    >
      <div class="treeDiv">
        <ul id="dataExportTree" class="ztree"></ul>
      </div>

      <template #header>
        <h5>选择目录</h5>
        <CButtonClose @click="dataExportMenuCancel" />
      </template>
      <template #footer>
        <CButton @click="dataExportMenuOk" color="info">确定</CButton>
        <CButton @click="dataExportMenuCancel" color="light">取消</CButton>
      </template>
    </CModal>-->
    <!-- <CModal
      title="发布数据信息"
      color="info"
      :show.sync="publishDataInfoShow"
      :closeOnBackdrop="false"
      size="lg"
      centered
    >
      <CRow>
        <CCol md="12">
          <CForm>
            <CInput
              label="发布名称"
              horizontal
              v-model="curItem.name"
              readonly
            />
            <CInput
              label="发布描述"
              horizontal
              v-model="curItem.description"
              readonly
            />
            <CInput
              label="发布用户"
              horizontal
              v-model="curItem.userName"
              readonly
            />
            <CInput
              label="创建时间"
              horizontal
              v-model="curItem.createTime"
              readonly
            />
            <Table
              border
              height="400"
              resizable
              :columns="getColumnPath"
              :data="publishPathTable"
            >
              <template slot-scope="{ row }" slot="show_details">
                <td class="py-2" align="center">
                  <CButton
                    v-c-tooltip="'删除'"
                    title="删除"
                    variant="outline"
                    style="padding: 4px; margin-top: -4px"
                    @click="delPath(row)"
                  >
                    <img
                      class="featuresstyle"
                      src="@/assets/icons/delete.svg"
                      alt
                    />
                  </CButton>
                </td>
              </template>
            </Table>
          </CForm>
        </CCol>
      </CRow>
      <template #header>
        <h5>发布数据信息</h5>
        <CButtonClose @click="infoCancel" />
      </template>
      <template #footer class="footerBtns">
        <CButton @click="infoOk" color="info">确定</CButton>
      </template>
    </CModal>-->

    <!-- <CModal
      title="数据优选"
      color="info"
      :show.sync="OptimizationDataModalShow"
      size="lg"
      centered
      :closeOnBackdrop="false"
    >
      <div>
        <Table
          border
          max-height="400"
          resizable
          :columns="getColumnOptimizationData"
          :data="OptimizationDataTable"
        >
          <template slot-scope="{ row }" slot="show_details1">
            <td class="py-2" align="center">
              
              <CButton
                v-c-tooltip="'删除'"
                title="删除"
                variant="outline"
                style="padding: 4px; margin-top: -4px"
                @click="delOptimizationData(row)"
              >
                <img
                  class="featuresstyle"
                  src="@/assets/icons/delete.svg"
                  alt
                />
              </CButton>
            </td>
          </template>
        </Table>
      </div>
      <CCardFooter class="page-link">
        <CRow>
          <CCol class="footerPage" style>
            <span class="pageContent">
              每页
              <CSelect
                @change="getVendorId3($event)"
                :options="[10, 15, 20, 25]"
                v-model="pageSize3"
                class="selectStyle"
                style
              />
              条记录。第{{ this.currentPage3 }}页(总共{{ this.total3 }}页，{{
                this.allNum3
              }}条记录)
            </span>
            <CPagination
              :activePage.sync="currentPage3"
              :pages="total3"
              align="end"
              v-if="total3 != 0"
            />
          </CCol>
        </CRow>
      </CCardFooter>
      <template #header>
        <h5>数据优选</h5>
        <CButtonClose @click="OptimizationDataCancel" />
      </template>
      <template #footer>
        <CButton @click="OptimizationDataOk" color="info">确定</CButton>
      </template>
    </CModal>-->
    <CModal
      :show.sync="delShow"
      :closeOnBackdrop="false"
      title="删除任务信息"
      centered
    >
      <template #header class="taskExecuteHeader">
        <img src="@/assets/icons/shanchu.svg" alt />
        <p class="delKuangShow">删除任务</p>
      </template>
      <div class="delKuangBody">
        <p>请确认是否删除?</p>
      </div>
      <template #footer class="footerBtns">
        <CButton @click="delCancel" color="info" class="delAnniu">取消</CButton>
        <CButton @click="delOk" color="info">确定</CButton>
      </template>
    </CModal>
  </div>
</template>
<script>
export default {
  name: "queryDeal",
  computed: {
    getColumnData() {
      return [
        {
          type: "selection",
          width: 60,
          align: "center",
        },
        // { key: "number", title: "序号", align: "center", width: "60" },
        {
          key: "tumbUrl",
          title: "缩略图",
          align: "center",
          width: "100",
          resizable: true,
          slot: "scope",
          align: "center",
        },
        {
          key: "satellite",
          title: "卫星",
          align: "center",
          width: "80",
          resizable: true,
        },
        {
          key: "sensor",
          title: "传感器",
          align: "center",
          width: "80",
          resizable: true,
        },

        {
          key: "createTime",
          title: "时间",
          align: "center",
          width: "120",
          resizable: true,
        },
        {
          key: "cloud",
          title: "云量(%)",
          align: "center",
          width: "90",
          resizable: true,
        },
      ];
    },
    getColumnExportData() {
      return [
        {
          key: "id",
          title: "序号",
          align: "center",
          width: "80",
          resizable: true,
        },
        {
          key: "dataPath",
          title: "数据路径",
          align: "center",
          width: "400",
          resizable: true,
        },
        {
          key: "createTime",
          title: "创建时间",
          align: "center",
          width: "170",
          resizable: true,
        },
        {
          key: "status",
          title: "执行状态",
          align: "center",
          width: "110",
          resizable: true,
        },
      ];
    },
    getColumnPublishData() {
      return [
        {
          key: "number",
          title: "序号",
          align: "center",
          width: "70",
          resizable: true,
        },
        {
          key: "name",
          title: "发布名称",
          align: "center",
          width: "auto",
          resizable: true,
        },
        {
          slot: "show_details",
          title: "操作",
          align: "center",
          width: "90",
          resizable: true,
        },
      ];
    },

    getColumnOptimizationData() {
      return [
        {
          key: "id",
          title: "序号",
          align: "center",
          width: "80",
          resizable: true,
        },
        {
          key: "dataExportPath",
          title: "筛选结果路径",
          align: "center",
          width: "303",
          resizable: true,
        },
        {
          key: "createTime",
          title: "创建时间",
          align: "center",
          width: "180",
          resizable: true,
        },
        {
          key: "status",
          title: "执行状态",
          align: "center",
          width: "110",
          resizable: true,
        },
        {
          slot: "show_details1",
          title: "操作",
          align: "center",
          width: "90",
          resizable: true,
        },
      ];
    },
    getColumnPath() {
      return [
        {
          key: "url",
          title: "数据路径",
          align: "center",
          width: "auto",
          resizable: true,
        },
        {
          slot: "show_details",
          title: "操作",
          align: "center",
          width: "70",
          resizable: true,
        },
      ];
    },
  },
  data() {
    return {
      startTimeOption: {},
      endTimeOption: {},
      saveAsModal: false,
      isDataOptimization: true,
      GF1List: [
        { label: "PMS", value: "GF1", isCheck: false },
        { label: "WFV", value: "GF1", isCheck: false },
      ],
      GF2List: [
        { label: "PMS", value: "GF2", isCheck: false },
        { label: "MSS", value: "GF2", isCheck: false },
      ],
      GF3List: [
        { label: "WAV", value: "GF3", isCheck: false },
        { label: "NSC", value: "GF3", isCheck: false },
        { label: "WSC", value: "GF3", isCheck: false },
        { label: "GLO", value: "GF3", isCheck: false },
        { label: "EXT", value: "GF3", isCheck: false },
        { label: "QPSLL", value: "GF3", isCheck: false },
        { label: "SAR", value: "GF3", isCheck: false },
        { label: "SL", value: "GF3", isCheck: false },
        { label: "UFS", value: "GF3", isCheck: false },
        { label: "FSI", value: "GF3", isCheck: false },
        { label: "FSII", value: "GF3", isCheck: false },
        { label: "SS", value: "GF3", isCheck: false },
        { label: "QPSI", value: "GF3", isCheck: false },
      ],
      GF4List: [
        { label: "PMI", value: "GF4", isCheck: false },
        { label: "PMS", value: "GF4", isCheck: false },
        { label: "IRS", value: "GF4", isCheck: false },
        { label: "PI", value: "GF4", isCheck: false },
      ],
      GF1BList: [{ label: "PMS", value: "GF1B", isCheck: false }],
      GF1CList: [{ label: "PMS", value: "GF1C", isCheck: false }],
      GF1DList: [{ label: "PMS", value: "GF1D", isCheck: false }],
      GF5List: [
        { label: "AHSI", value: "GF5", isCheck: false },
        { label: "VIMS", value: "GF5", isCheck: false },
      ],
      GF6List: [
        { label: "PMS", value: "GF6", isCheck: false },
        { label: "WFV", value: "GF6", isCheck: false },
      ],
      /** 资源系列 */
      ZY302List: [
        { label: "TLC", value: "ZY03", isCheck: false },
        { label: "NAD", value: "ZY03", isCheck: false },
        { label: "MUX", value: "ZY03", isCheck: false },
      ],
      ZY3List: [
        { label: "P5M", value: "CBERS04", isCheck: false },
        { label: "P10", value: "CBERS04", isCheck: false },
        { label: "IRS", value: "CBERS04", isCheck: false },
        { label: "MUX", value: "CBERS04", isCheck: false },
        { label: "WFI", value: "CBERS04", isCheck: false },
      ],
      ZY02CList: [
        { label: "PMS", value: "ZY02C", isCheck: false },
        { label: "HRC", value: "ZY02C", isCheck: false },
      ],
      BJ2List: [{ label: "PAN", value: "BJ2", isCheck: false }],
      /** 资源系列 */

      /** 环境减灾系列 */
      HJ2AList: [
        { label: "CCD", value: "HJ2A", isCheck: false },
        { label: "HSI", value: "HJ2A", isCheck: false },
        { label: "IRS", value: "HJ2A", isCheck: false },
      ],
      HJ1BList: [
        { label: "CCD", value: "HJ1B", isCheck: false },
        { label: "IRS", value: "HJ1B", isCheck: false },
      ],
      HJ2BList: [
        { label: "CCD", value: "HJ2B", isCheck: false },
        { label: "HSI", value: "HJ2B", isCheck: false },
        { label: "IRS", value: "HJ2B", isCheck: false },
      ],
      HJ1AList: [
        { label: "CCD", value: "HJ1A", isCheck: false },
        { label: "HSI", value: "HJ1A", isCheck: false },
      ],
      HJ1CList: [{ label: "SAR", value: "HJ1C", isCheck: false }],
      /** 环境减灾系列 */
      currentGF1Lst: [],
      currentGF2Lst: [],
      currentGF3Lst: [],
      currentGF4Lst: [],
      currentGF1BLst: [],
      currentGF1CLst: [],
      currentGF1DLst: [],
      currentGF5Lst: [],
      currentGF6Lst: [],

      currentZY02CLst: [],
      currentZY3Lst: [],
      currentZY302Lst: [],
      currentBJ2Lst: [],
      currentHJ2ALst: [],
      currentHJ1BLst: [],
      currentHJ2BLst: [],
      currentHJ1ALst: [],
      currentHJ1CLst: [],

      //   isInvalidCheck: false,
      //   isCoverCheck: false,

      isLoading: false,
      loadingText: "正在拷贝，请稍后...",
      TabName: "QueryData",
      cloudPercent: 10, //云量
      //resolution: "2", //分辨率
      indeterminate: false,
      checkAll: false,
      globalLineData: [], //所有的图框坐标
      drawDataTotal: [],
      // WebSocket 避免重复连接
      lockReconnect: false, //避免重复连接
      //心跳检测
      map: null,
      sideBarBlock: true,
      regionBlock: true,
      //   drawBlock: false,
      //   shpBlock: false,
      importantRegionBlock: false,
      provinceRegionCascader: [
        {
          label: "全国",
          value: 0,
          tag: "china",
          code: 0,
        },
      ],
      cityRegionCascader: [],
      countyRegionCascader: [],
      countyArray: [],
      cityArray: [],
      provinceArray: [],
      isCounty: true,
      isCity: true,

      //选择的区域code
      provinceCode: "",
      cityCode: "",
      countyCode: "",
      //   clearable: true,
      regionCode: "0",

      // 重点区域
      importantRegionCascader: [],

      // 当前选择区域
      currentRegionQuery: [],
      //矢量数据选择参数
      shpPath: "",
      showPushTaskZtreeModal: false,
      showZtreeModal: false,
      curFileType: ".shp",
      suffix: ["shp"],
      currenSelectSuffix: "shp",
      haveHeader: false,

      //产品级别
      productLevelList: ["LEVEL1A", "LEVEL2", "LEVEL3", "LEVEL4"],
      productLevel: "LEVEL1A",

      //开始日期与结束日期
      startDate: "",
      endDate: "",

      // 表格分页
      currentPage: 1,
      pages: 0,
      total: 0,
      allNum: 0,
      pageSize: 15,

      showPop: false,

      GFSensorSelectShow: true,
      ZYsensorSelectShow: false,
      HJsensorSelectShow: false,
      // 绘制数据框
      // globalLineData: [],
      currentRegion: [],
      shpBoundary: "",

      //数据发布相关
      delShow: false,
      dataPublishModal: false,
      publishData: [],
      publishName: "",
      publishDesc: "",
      publishDataTable: [],
      publishPathTable: [],
      publishDataInfoShow: false,
      curItem: "",

      // 选择流程执行相关
      SelectWorkFlowModal: false,

      newFileName: "",

      //生成报告
      reportTxt: "",
      // 新加参数
      allDataTableDataList: [],
      dataTable: [],
      dataIds: [],
      isSpinShow: false,
      processingList: [],
      selectFlowID: 0,
    };
  },
  watch: {
    pageSize(newVal, oldVal) {
      this.pageSize = newVal;
      this.getPageData(this.allDataTableDataList);
    },
    currentPage(newVal, oldVal) {
      this.currentPage = newVal;
      this.getPageData(this.allDataTableDataList);
    },

    pageSize3(newVal, oldVal) {
      this.pageSize3 = newVal;
      this.lookDetail();
    },
    currentPage3(newVal, oldVal) {
      this.currentPage3 = newVal;
      this.lookDetail();
    },
    startDate(newVal, oldVal) {
      this.startDate = this.$moment(newVal).format("YYYY-MM-DD");
    },
    endDate(newVal, oldVal) {
      this.endDate = this.$moment(newVal).format("YYYY-MM-DD");
    },
  },
  mounted() {
    let user = this.$store.state.user;
    if (user != null) {
      this.currentToken = user.token;
    }

    this.initMap();
    this.provinceRegionQuery();
  },
  components: {},
  created() {},
  destroyed: function () {},
  methods: {
    // 输入框判断 start
    onStartTimeChange(startTime, type) {
      this.endTimeOption = {
        disabledDate(endTime) {
          // return endTime < new Date(startTime) || endTime > Date.now();
          return (
            endTime < new Date(startTime) - 8 * 60 * 60 * 1000 ||
            endTime > Date.now()
          );
        },
      };
    },
    onEndTimeChange(endTime, type) {
      this.startTimeOption = {
        disabledDate(startTime) {
          return startTime >= new Date(endTime) || startTime >= Date.now();
        },
      };
    },

    changeDataOptimization(val) {
      this.isDataOptimization = val;
    },
    // 流程选择
    processingOnChange(item) {
      this.selectFlowID = item.value;
    },
    getProcessingData() {
      //debugger;
      //let path = this.GlobalUrlPath.productManage.getProduct;
      let path = this.$api.queryDealApi.query;
      this.http.get(path).then((res) => {
        if (res.data.code == 0) {
          this.processingList = res.data.data.dataList;
        } else {
          this.$Message.error(res.data.message);
        }
      });
    },
    /** 生成报告 */
    reportGeneration() {
      var pom = document.createElement("a");
      pom.setAttribute(
        "href",
        "data:text/plain;charset=utf-8," + encodeURIComponent(this.reportTxt)
      );
      pom.setAttribute("download", "reportQuery.txt");
      if (document.createEvent) {
        var event = document.createEvent("MouseEvents");
        event.initEvent("click", true, true);
        pom.dispatchEvent(event);
      } else {
        pom.click();
      }
    },
    /** 生成报告 */

    /** 产品级别 */
    selectProductLevel(event) {
      this.productLevel = event.target.value;
    },
    /** 产品级别 */

    /** 以下为传感器部分 */
    changeGF1Input(index) {
      this.GF1List.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "GF1";
      this.getCurrentList(type);
    },
    changeGF2Input(index) {
      this.GF2List.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "GF2";
      this.getCurrentList(type);
    },
    changeGF3Input(index) {
      this.GF3List.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "GF3";
      this.getCurrentList(type);
    },
    changeGF4Input(index) {
      this.GF4List.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "GF4";
      this.getCurrentList(type);
    },
    changeGF1BInput(index) {
      this.GF1BList.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "GF1B";
      this.getCurrentList(type);
    },
    changeGF1CInput(index) {
      this.GF1CList.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "GF1C";
      this.getCurrentList(type);
    },
    changeGF1DInput(index) {
      this.GF1DList.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "GF1D";
      this.getCurrentList(type);
    },
    changeGF5Input(index) {
      this.GF5List.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "GF5";
      this.getCurrentList(type);
    },
    changeGF6Input(index) {
      this.GF6List.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "GF6";
      this.getCurrentList(type);
    },
    changeZY02CInput(index) {
      this.ZY02CList.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "ZY02C";
      this.getCurrentList(type);
    },
    changeZY3Input(index) {
      this.ZY3List.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "ZY3";
      this.getCurrentList(type);
    },
    changeZY302Input(index) {
      this.ZY302List.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "ZY302";
      this.getCurrentList(type);
    },
    changeBJ2Input(index) {
      this.BJ2List.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "BJ2";
      this.getCurrentList(type);
    },
    /** 环境减灾系列 */
    changeHJ2AInput(index) {
      this.HJ2AList.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "HJ2A";
      this.getCurrentList(type);
    },
    changeHJ1BInput(index) {
      this.HJ1BList.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "HJ1B";
      this.getCurrentList(type);
    },
    changeHJ2BInput(index) {
      this.HJ2BList.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "HJ2B";
      this.getCurrentList(type);
    },
    changeHJ1AInput(index) {
      this.HJ1AList.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "HJ1A";
      this.getCurrentList(type);
    },
    changeHJ1CInput(index) {
      this.HJ1CList.map((v, i) => {
        if (i == index && v.isCheck) {
          v.isCheck = true;
        } else if (i == index && !v.isCheck) {
          v.isCheck = false;
        }
      });
      let type = "HJ1C";
      this.getCurrentList(type);
    },
    /** 环境减灾系列 */
    getCurrentList(type) {
      if (type == "GF1") {
        this.currentGF1Lst = [];
        let proLst = this.GF1List;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentGF1Lst.push(proLst[i]);
          }
        }
      } else if (type == "GF2") {
        this.currentGF2Lst = [];
        let proLst = this.GF2List;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentGF2Lst.push(proLst[i]);
          }
        }
      } else if (type == "GF3") {
        this.currentGF3Lst = [];
        let proLst = this.GF3List;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentGF3Lst.push(proLst[i]);
          }
        }
      } else if (type == "GF4") {
        this.currentGF4Lst = [];
        let proLst = this.GF4List;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentGF4Lst.push(proLst[i]);
          }
        }
      } else if (type == "GF1B") {
        this.currentGF1BLst = [];
        let proLst = this.GF1BList;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentGF1BLst.push(proLst[i]);
          }
        }
      } else if (type == "GF1C") {
        this.currentGF1CLst = [];
        let proLst = this.GF1CList;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentGF1CLst.push(proLst[i]);
          }
        }
      } else if (type == "GF1D") {
        this.currentGF1DLst = [];
        let proLst = this.GF1DList;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentGF1DLst.push(proLst[i]);
          }
        }
      } else if (type == "GF5") {
        this.currentGF5Lst = [];
        let proLst = this.GF5List;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentGF5Lst.push(proLst[i]);
          }
        }
      } else if (type == "GF6") {
        this.currentGF6Lst = [];
        let proLst = this.GF6List;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentGF6Lst.push(proLst[i]);
          }
        }
      } else if (type == "ZY02C") {
        this.currentZY02CLst = [];
        let proLst = this.ZY02CList;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentZY02CLst.push(proLst[i]);
          }
        }
      } else if (type == "ZY3") {
        this.currentZY3Lst = [];
        let proLst = this.ZY3List;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentZY3Lst.push(proLst[i]);
          }
        }
      } else if (type == "ZY302") {
        this.currentZY302Lst = [];
        let proLst = this.ZY302List;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentZY302Lst.push(proLst[i]);
          }
        }
      } else if (type == "BJ2") {
        this.currentBJ2Lst = [];
        let proLst = this.BJ2List;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentBJ2Lst.push(proLst[i]);
          }
        }
      } else if (type == "HJ2A") {
        this.currentHJ2ALst = [];
        let proLst = this.HJ2AList;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentHJ2ALst.push(proLst[i]);
          }
        }
      } else if (type == "HJ1B") {
        this.currentHJ1BLst = [];
        let proLst = this.HJ1BList;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentHJ1BLst.push(proLst[i]);
          }
        }
      } else if (type == "HJ2B") {
        this.currentHJ2BLst = [];
        let proLst = this.HJ2BList;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentHJ2BLst.push(proLst[i]);
          }
        }
      } else if (type == "HJ1A") {
        this.currentHJ1ALst = [];
        let proLst = this.HJ1AList;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentHJ1ALst.push(proLst[i]);
          }
        }
      } else if (type == "HJ1C") {
        this.currentHJ1CLst = [];
        let proLst = this.HJ1CList;
        for (let i = 0; i < proLst.length; i++) {
          if (proLst[i].isCheck) {
            this.currentHJ1CLst.push(proLst[i]);
          }
        }
      }
    },

    /** 以上为传感器部分 */
    getVendorId(event) {
      let tempdata = event.target.value; //获取option对应的value值
      this.pageSize = parseInt(tempdata);
    },
    getVendorId2(event) {
      let tempdata = event.target.value; //获取option对应的value值
      this.pageSize2 = parseInt(tempdata);
    },
    getVendorId3(event) {
      let tempdata = event.target.value; //获取option对应的value值
      this.pageSize3 = parseInt(tempdata);
      //this.lookDetail();
    },

    /** 重点区域 */
    importantRegionOprator() {
      //debugger;
      this.importantRegionCascader = [];
      this.regionBlock = false;
      this.importantregionBlock = true;
      let path = this.$api.queryDealApi.disasterImportRegionQuery;
      this.http.get(path).then((res) => {
        if (res.data.code == 200) {
          let importantRegionLst = res.data.data;
          for (let i = 0; i < importantRegionLst.length; i++) {
            let importantRegion = importantRegionLst[i];
            let tempData2 = {
              value: importantRegion.wkt,
              label: importantRegion.name,
              code: importantRegion.code,
              number: i,
            };
            this.importantRegionCascader.push(tempData2);
          }
        }
      });
    },

    // 重点区域值改变
    importRegionChangeEvent(value, selectedData) {
      this.currentRegionName = selectedData[0].label;
      //this.currentImportantRegion=selectedData[0].value;

      let b = selectedData[0].value;
      let currentImportantRegions = $.parseJSON(b);
      //this.currentImportantRegion = currentImportantRegions;

      this.regionCode = selectedData[0].code;
      this.currentRegionQuery = [];
      let tempdata1 = {
        geoType: "",
        geoValue: "",
        code: "",
      };

      tempdata1["geoType"] = "polygon";
      tempdata1["geoValue"] = currentImportantRegions;
      tempdata1["code"] = selectedData[0].code;

      this.currentRegionQuery.push(tempdata1);
      if (currentImportantRegions.type == "GeometryCollection") {
        // 绘制区域
        this.drawGeometry(currentImportantRegions.geometries);
      } else {
        // 绘制区域
        this.drawGeometry(currentImportantRegions.features[0].geometry);
      }
    },
    /** 重点区域 */
    //区划查询
    provinceRegionQuery() {
      let self = this;
      let path = this.$api.queryDealApi.regionQueryProvince;
      let param = {};
      self.http.get(path, param).then((res) => {
        if (res.data.code == 200) {
          let province = res.data.data;
          self.provinceRegionCascader = [];
          for (let i = 0; i < province.length; i++) {
            let obj = {};
            obj["name"] = province[i].name;
            obj["code"] = province[i].code;
            //obj["bounds"] = province[i].properties.bounds;
            //obj["tag"] = "province";
            let tempdata = {
              value: obj,
              label: province[i].name,
            };
            self.provinceRegionCascader.push(tempdata);
          }
        }
      });
    },

    //city的加载
    cityRegionQuery(code) {
      let path =
        this.$api.queryDealApi.regionQueryCityByProvince +
        `${this.provinceCode}`;
      let cityNum;
      let cityTotal = {};
      let countyTotal = {};
      let countyType = [];
      this.http.get(path).then((res) => {
        if (res.data.code == 200) {
          this.cityRegionCascader = [];
          let CityData = res.data.data;
          cityNum = CityData.length;

          for (let i = 0; i < cityNum; i++) {
            //let num = countyType.length;
            let obj = {};
            obj["name"] = CityData[i].name;
            obj["code"] = CityData[i].code;
            let tempdata1 = {
              value: obj,
              label: CityData[i].name,
              number: i,
            };

            this.cityRegionCascader.push(tempdata1);
          }
        }
      });
    },

    countyRegionQuery(code) {
      let path = this.$api.queryDealApi.regionQueryAreaByCityCode + `${code}`;
      let countyType = {};
      this.http.get(path).then((res) => {
        if (res.data.code == 200) {
          let coutyData = res.data.data;
          let tempData = {};
          this.countyRegionCascader = [];
          for (let j = 0; j < coutyData.length; j++) {
            let obj = {};
            obj["name"] = coutyData[j].name;
            obj["code"] = coutyData[j].code;
            tempData = {
              value: obj,
              label: coutyData[j].name,
            };
            this.countyRegionCascader.push(tempData);
          }
        }
      });
    },
    /** 省市县值改变 */
    provinceRegionChangeEvent(event) {
      if (event.length <= 0) {
        this.regionCode = "0";
        this.countyArray = [];
        this.cityArray = [];
        return;
      }
      this.currentRegionQuery = [];
      this.provinceCode = event[0].code;
      this.cityRegionQuery(event[0].code);
      this.countyRegionCascader = [];
      this.cityRegionCascader = [];
      this.isCity = false;
      this.isCounty = true;
      this.regionCode = this.provinceCode + "0000";
      this.drawGeometryByCode(this.regionCode, 0);
      this.countyArray = [];
      this.cityArray = [];

      let tempdata = {
        geoType: "region",
        geoValue: this.provinceCode,
      };

      this.currentRegionQuery.push(tempdata);
    },
    cityRegionChangeEvent(event) {
      if (event.length <= 0) {
        let code = this.regionCode;
        this.regionCode = code.substring(0, 2) + "0000";
        this.countyArray = [];
        this.drawGeometryByCode(this.regionCode, 0);
        return;
      }
      this.currentRegionQuery = [];
      this.cityCode = event[0].code;
      this.countyRegionQuery(event[0].code);
      this.countyRegionCascader = [];
      this.isCounty = false;
      this.regionCode = this.cityCode + "00";
      this.countyArray = [];
      this.drawGeometryByCode(this.regionCode, 1);

      let tempdata = {
        geoType: "region",
        geoValue: this.cityCode,
      };
      this.currentRegionQuery.push(tempdata);
    },
    countyRegionChangeEvent(event) {
      if (event.length <= 0) {
        let code = this.regionCode;
        this.regionCode = code.substring(0, 4) + "00";
        this.drawGeometryByCode(this.regionCode, 1);
        return;
      }
      this.currentRegionQuery = [];
      this.countyCode = event[0].code;
      this.regionCode = this.countyCode.toString();
      this.drawGeometryByCode(this.regionCode, 2);

      let tempdata = {
        geoType: "region",
        geoValue: this.regionCode,
      };
      this.currentRegionQuery.push(tempdata);
    },
    /** 省市县值改变 */

    /** 矢量数据选择 */
    //矢量文件操作
    selectdropPicPath() {
      this.bSelectExportShp = false;
      this.bRangeShpPath = false;
      this.bDropPicPath = true;

      this.showPushTaskZtreeModal = true;
      this.pushTaskMenu();
    },
    selectRangeShpPath() {
      this.bDropPicPath = false;
      this.bSelectExportShp = false;
      this.bRangeShpPath = true;

      this.showPushTaskZtreeModal = true;
      this.pushTaskMenu();
    },
    selectExportShpPath() {
      this.bDropPicPath = false;
      this.bRangeShpPath = false;
      this.bSelectExportShp = true;

      this.showPushTaskZtreeModal = true;
      this.pushTaskMenu();
    },
    selecrShpPath() {
      //this.bIsScanDir = false;
      this.bDropPicPath = false;
      this.bRangeShpPath = false;
      this.bSelectExportShp = false;

      this.showPushTaskZtreeModal = true;
      this.pushTaskMenu();
    },
    pushTaskMenu(type) {
      let treeObj = $.fn.zTree.getZTreeObj("pushTaskTree");
      if (treeObj != null) {
        var nodes = treeObj.getNodes();
        for (var i = nodes.length - 1; i >= 0; i--) {
          treeObj.removeNode(nodes[i]);
        }
      }

      //1 共享 2 用户 3 推送任务扫描
      let path = this.GlobalUrlPath.processProduct.fileRootPath + 1;

      this.pushTaskMenuSetting(path);
    },
    // 应急推送任务扫描目录、生产目录Ztree设置
    pushTaskMenuSetting(urlPath) {
      let checkType = { Y: "", N: "" }; //父与子的关联去掉
      let setting = {
        check: {
          enable: true,
          nocheckInherit: false,
          chkboxType: checkType,
        },
        data: {
          simpleData: {
            enable: true,
          },
        },
        callback: {
          beforeClick: this.beforeClick,
          onClick: this.zTreeOnClick,
          onCheck: this.zTreePushTaskOnCheck,
          onExpand: this.zTreeOnClick,
        },
      };

      this.http.get(urlPath).then((res) => {
        let data = res.data;
        if (data.success == true) {
          $.fn.zTree.init($("#pushTaskTree"), setting, data.data);
        }
      });
    },

    zTreePushTaskOnCheck(event, treeId, treeNode) {
      var treeObj = $.fn.zTree.getZTreeObj(treeId),
        nodes = treeObj.getCheckedNodes(true);

      // if (!treeNode.isParent) {
      //   this.$Message.error("请选择文件夹！");
      //   treeNode.checked = false;
      //   treeObj.updateNode(treeNode);
      //   return;
      // }
      if (nodes.length > 1) {
        //限制单个文件夹
        this.$Message.error("矢量数据只能选择一个！");
        treeNode.checked = false;
        treeObj.updateNode(treeNode);
        return;
      }
    },
    zTreeOnClick(event, treeId, treeNode) {
      let path = this.$api.queryDealApi.getFileListByPath;
      let param = {
        path: treeNode.id,
      };
      var treeObj = $.fn.zTree.getZTreeObj(treeId);
      var node = treeObj.getNodeByParam("id", treeNode.id);
      treeObj.selectNode(node);
      let sNode = treeObj.getSelectedNodes();
      if (sNode.length > 0) {
        let zAsync = sNode[0].zAsync;
        treeObj.reAsyncChildNodes(treeNode, "refresh");
        if (zAsync) {
        } else {
          this.http.get(path, param).then((res) => {
            let data = res.data;
            if (data.success == true) {
              treeNode.halfCheck = false;
              treeObj.addNodes(treeNode, data.data, false);
              sNode[0].zAsync = true;
            }
          });
        }
      }
    },

    // 文件另存为modal界面初始化
    menuSaveAs() {
      let treeObj = $.fn.zTree.getZTreeObj("pushTaskTree");
      if (treeObj == null) {
        this.$Message.warning("请选择文件夹！");
        return;
      }

      let selectNodes = treeObj.getSelectedNodes();
      if (selectNodes.length < 1) {
        this.$Message.warning("请选择文件夹节点！");
        return;
      }
      if (!selectNodes[0].isParent) {
        this.$Message.warning("请选择文件夹！");
        return;
      }
      this.newFileName = ""; //界面文件名置为空
      this.saveAsModal = true;

      // if (this.currenItem.type.name.toLowerCase() === "file") {
      //   self.isFile = true;
      //   $(".saveFile").css("display", "block");
      //   $(".saveFolder").css("display", "none");
      // }
      // //用于新增文件或文件夹标识
      // else {
      //   $(".saveFile").css("display", "none");
      //   $(".saveFolder").css("display", "block");
      //   self.isFile = false;
      // }
    },

    saveAsFileOK() {
      //debugger
      let fileName = this.newFileName;
      this.saveAsModal = false;
      let treeObj = $.fn.zTree.getZTreeObj("pushTaskTree");

      let selectNodes = treeObj.getSelectedNodes();
      let newNode = null;
      if (fileName == null || fileName == "") {
        this.$Message.warning("文件名或文件夹名称为空，请重写填写");
        return;
      }
      //if (isFile) {
      //文件 判断文件名是否符合带后缀
      let a = fileName.split("").reverse().join("");
      let b = a.substring(0, a.search(/\./)).split("").reverse().join("");
      if (b == null || b == "") {
        this.$Message.warning("该文件名无效，没有后缀");
        return;
      }
      newNode = {
        name: fileName,
        id: selectNodes[0].id + "/" + fileName,
        isParent: false,
      };
      // } else {
      //   newNode = {
      //     name: fileName,
      //     id: selectNodes[0].id + "/" + fileName,
      //     isParent: true,
      //   };
      // }
      if (newNode == null) return;
      treeObj.addNodes(selectNodes[0], 0, newNode, true); //新增节点放在文件夹的顶层并默认选择
      let node = selectNodes[0].children[0];
      node.checked = true;
      treeObj.updateNode(node);
    },

    saveAsFileCancel() {
      this.saveAsModal = false;
    },

    pushTaskMenuOk() {
      let treeObj = $.fn.zTree.getZTreeObj("pushTaskTree"),
        nodes = treeObj.getCheckedNodes(true);
      let tempNode = "";
      let info = "";
      for (var index in nodes) {
        tempNode = nodes[index];
        if (info == "") {
          info = tempNode.id;
        } else {
          info += ";" + tempNode.id;
        }
      }
      if (info.length < 3) {
        this.$Message.error("请选择矢量(.shp)文件！");
        this.pushTaskReset();
      } else {
        if (this.bDropPicPath) {
          let shpFileSufix = info.substr(info.length - 3, info.length);
          if (shpFileSufix == "shp" || shpFileSufix == "SHP") {
            this.dropPicPath = info;
          } else {
            this.$Message.error("请选择矢量(.shp)文件！");
          }
        } else if (this.bRangeShpPath) {
          let shpFileSufix = info.substr(info.length - 3, info.length);
          if (shpFileSufix == "shp" || shpFileSufix == "SHP") {
            this.rangeShpPath = info;
          } else {
            this.$Message.error("请选择矢量(.shp)文件！");
          }
        } else if (this.bSelectExportShp) {
          this.selectShpPath = info;
        } else {
          let shpFileSufix = info.substr(info.length - 3, info.length);
          if (shpFileSufix == "shp" || shpFileSufix == "SHP") {
            this.shpPath = info;
            //this.regionResultList.push(this.shpPath);

            //矢量数据后台处理
            let path = this.GlobalUrlPath.sthxTaskTaskInfo.regionShpFileQuery;
            //let fileName = this.shpPath;
            // let fileName={
            //   fileName:this.shpPath,
            // }
            let param = {
              fileName: this.shpPath,
            };
            this.http.post(path, param).then((res) => {
              if (res.data.code == 200) {
                let shpDataRegion = res.data.data;
                let tempdata1 = {
                  geoType: "",
                  geoValue: "",
                };
                this.shpBoundary = JSON.stringify(shpDataRegion.features[0]);
                tempdata1["geoType"] = "polygon";
                tempdata1["geoValue"] = shpDataRegion;
                this.currentRegion.push(tempdata1);
                // 绘制区域
                this.drawGeometry(shpDataRegion.features[0]);
              } else {
                this.$Message.error("读取矢量数据失败！！");
              }
            });

            // 绘制区域
            // this.drawGeometry(this.currentImportantRegion.geometries);
          } else {
            this.$Message.error("请选择矢量(.shp)文件！");
          }
        }
        this.pushTaskReset();
      }
    },
    pushTaskMenuCancel() {
      this.pushTaskReset();
    },
    pushTaskReset() {
      var treeObj;
      this.showPushTaskZtreeModal = false;
      treeObj = $.fn.zTree.getZTreeObj("pushTaskTree");
      if (treeObj == null) return;

      var nodes = treeObj.getNodes();
      for (var i = nodes.length - 1; i >= 0; i--) {
        treeObj.removeNode(nodes[i]);
      }
    },
    getSatelliteAndSensor() {
      let satellite = "";
      let sensors = "";
      if (this.currentGF1Lst.length != 0) {
        for (let i = 0; i < this.currentGF1Lst.length; i++) {
          let sensor = this.currentGF1Lst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentGF1Lst[0].value + ",";
      }
      if (this.currentGF2Lst.length != 0) {
        for (let i = 0; i < this.currentGF2Lst.length; i++) {
          let sensor = this.currentGF2Lst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentGF2Lst[0].value + ",";
      }
      if (this.currentGF3Lst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentGF3Lst.length; i++) {
          let sensor = this.currentGF3Lst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentGF3Lst[0].value + ",";
      }
      if (this.currentGF4Lst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentGF4Lst.length; i++) {
          let sensor = this.currentGF4Lst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentGF4Lst[0].value + ",";
      }
      if (this.currentGF1BLst.length != 0) {
        for (let i = 0; i < this.currentGF1BLst.length; i++) {
          let sensor = this.currentGF1BLst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentGF1BLst[0].value + ",";
      }
      if (this.currentGF1CLst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentGF1CLst.length; i++) {
          let sensor = this.currentGF1CLst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentGF1CLst[0].value + ",";
      }
      if (this.currentGF1DLst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentGF1DLst.length; i++) {
          let sensor = this.currentGF1DLst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentGF1DLst[0].value + ",";
      }
      if (this.currentGF5Lst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentGF5Lst.length; i++) {
          let sensor = this.currentGF5Lst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentGF5Lst[0].value + ",";
      }
      if (this.currentGF6Lst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentGF6Lst.length; i++) {
          let sensor = this.currentGF6Lst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentGF6Lst[0].value + ",";
      }
      if (this.currentZY02CLst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentZY02CLst.length; i++) {
          let sensor = this.currentZY02CLst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentZY02CLst[0].value + ",";
      }
      if (this.currentZY3Lst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentZY3Lst.length; i++) {
          let sensor = this.currentZY3Lst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentZY3Lst[0].value + ",";
      }
      if (this.currentZY302Lst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentZY302Lst.length; i++) {
          let sensor = this.currentZY302Lst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentZY302Lst[0].value + ",";
      }
      if (this.currentBJ2Lst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentBJ2Lst.length; i++) {
          let sensor = this.currentBJ2Lst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + "BEIJING2,";
      }
      if (this.currentHJ2ALst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentHJ2ALst.length; i++) {
          let sensor = this.currentHJ2ALst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentHJ2ALst[0].value + ",";
      }
      if (this.currentHJ2BLst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentHJ2BLst.length; i++) {
          let sensor = this.currentHJ2BLst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentHJ2BLst[0].value + ",";
      }
      if (this.currentHJ1BLst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentHJ1BLst.length; i++) {
          let sensor = this.currentHJ1BLst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentHJ1BLst[0].value + ",";
      }
      if (this.currentHJ1ALst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentHJ1ALst.length; i++) {
          let sensor = this.currentHJ1ALst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentHJ1ALst[0].value + ",";
      }
      if (this.currentHJ1CLst.length != 0) {
        //let sensorIds = [];
        for (let i = 0; i < this.currentHJ1CLst.length; i++) {
          let sensor = this.currentHJ1CLst[i].label;
          sensors = sensors + sensor + ",";
        }
        satellite = satellite + this.currentHJ1CLst[0].value + ",";
      }
      return {
        satellite: satellite,
        sensors: sensors,
      };
    },

    /** 以上为矢量数据选择 */
    // 数据查询
    dataQuery() {
      debugger;
      let satellites = [];
      this.globalLineData = [];
      this.periods = [];
      // if (this.endDate == "Invalid date") {
      //   this.endDate = "";
      // }
      // if (this.startDate == "Invalid date") {
      //   this.startDate = "";
      // }
      // if (this.startDate == "" || this.endDate == "") {
      //   this.$Message.error("请选择采集时间!");
      //   return;
      // }
      let TimeDate = {
        startTime: this.startDate,
        endTime: this.endDate,
      };
      this.periods.push(TimeDate);   
      let satelliteInfo = this.getSatelliteAndSensor();
  
      let path = this.$api.queryDealApi.queryDataList;
      let param = {};

      param = {
        area: this.currentRegionQuery,

        period: this.periods,
        level: this.productLevel,
        cloud: this.cloudPercent,
        satellite: satelliteInfo.satellite,
        sensor: satelliteInfo.sensors,
        filter: this.isDataOptimization,
        // satellites: satellites,
      };

      // 查询时清空地图上的缩略图
      for (let i = 0; i < this.dataIds.length; i++) {
        let layerId = this.dataIds[i] + "_image";
        this.removeLayer(layerId);
      }
      this.isSpinShow = true;
      this.http.post(path, param).then((res) => {
        this.isSpinShow = false;
        if (res.data.code == 200) {
          let dataTableaa = [];
          let DataList = res.data.data;
          for (let i = 0; i < DataList.length; i++) {
            let region = this.parseRegionStr(DataList[i].region);
            this.globalLineData.push(region);

            dataTableaa.push({
              tumbUrl: DataList[i].tumbUrl,
              satellite: DataList[i].satellite,
              sensor: DataList[i].sensor,
              cloud: DataList[i].cloud,
              resolution: DataList[i].resolution,
              createTime: DataList[i].createTime,
              dataId: DataList[i].dataId,
              region: region,
              productLevel: DataList[i].levl,
              //sensor:DataList[i].sensor,
            });
          }      
          this.reportTxt = JSON.stringify(dataTableaa);
          this.allDataTableDataList = dataTableaa;
          //this.dataTable = dataTableaa;
          this.getPageData(this.allDataTableDataList);

          this.drawDataFrame();
          this.$Message.success("查询数据成功");
          this.TabName = "QueryResult";
        } else {
          //this.TabName = "QueryResult";
          this.$Message.error("查询失败");
        }
      });
    },

    getPageData(allDataTableDataList) {
      // let newList= this.allDataTableDataList.filter( (item) => item.label.toLowerCase() === "modis")
      let currentPage = this.currentPage;
      let pageSize = this.pageSize;
      this.dataTable = [];
      let beginIndex = (currentPage - 1) * pageSize;
      let lastIndex = currentPage * pageSize - 1; //9
      for (let i = beginIndex; i < allDataTableDataList.length; i++) {
        let temp = allDataTableDataList[i];

        if (i > lastIndex) break;
        this.dataTable.push(temp);
      }

      this.allNum = allDataTableDataList.length;
      this.total = Math.ceil(allDataTableDataList.length / this.pageSize);
      for (let i = 0; i < allDataTableDataList.length; i++) {
        if (i > lastIndex) break;
        this.dataTable[i].number =
          (this.currentPage - 1) * this.pageSize + i + 1;
      }
    },

    // 卫星传感器选择
    sensorGFDropdown() {
      this.GFSensorSelectShow = !this.GFSensorSelectShow;
    },
    sensorZYDropdown() {
      this.ZYsensorSelectShow = !this.ZYsensorSelectShow;
    },
    sensorHJJZDropdown() {
      this.HJsensorSelectShow = !this.HJsensorSelectShow;
    },

    onselectionchange(event) {
      this.dataIds = [];
      //debugger
      for (let i = 0; i < event.length; i++) {
        this.dataIds.push(event[i].dataId);
      }
    },
    getimgPath(path) {
      return path;
    },
    //空间范围操作切换
    regionOperator() {
      this.regionBlock = true;
      this.importantRegionBlock = false;
      //this.drawBlock = false;
      //this.shpBlock = false;
    },
    importantRegionOperator() {
      this.regionBlock = false;
      this.importantRegionBlock = true;
      this.importantRegionCascader = [];
      let path = this.$api.queryDealApi.disasterImportRegionQuery;
      this.http.get(path).then((res) => {
        if (res.data.code == 200) {
          let importantRegionLst = res.data.data;
          for (let i = 0; i < importantRegionLst.length; i++) {
            let importantRegion = importantRegionLst[i];
            let tempData2 = {
              value: importantRegion.wkt,
              label: importantRegion.name,
              code: importantRegion.code,
              number: i,
            };
            this.importantRegionCascader.push(tempData2);
          }
        }
      });
    },
    // drawOperator() {
    //   this.regionBlock = false;
    //   this.drawBlock = true;
    //   this.shpBlock = false;
    // },
    // shpOperator() {
    //   this.regionBlock = false;
    //   this.drawBlock = false;
    //   this.shpBlock = true;
    // },
    initMap() {
      let that = this;
      this.map = new mapboxgl.Map({
        container: "dataQueryDqmap", // container id
        // style:
        //   "http://121.36.21.73:20002/api/pie-cloud/layerData/layerTemplates?id=2c92808c71bafa7a01720c80d12f010c&key=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbmZvIjoie1widXNlcklkXCI6XCIxMDFcIixcImtleVwiOlwiOTBjNGI5NDI0N2FiMThmYmRiZTMyZDc4NzBkMTVjN2JcIn0ifQ.ifWlOcwmtenARlro-tf9hdLDlXjmbIa2T5AwSvRQB-M",
        style: "./static/map/map.json",
        // simple, //四维地球
        // "http://121.36.21.73:20002/api/pie-cloud/layerData/layerTemplates?id=2c92808c71bafa7a01720c80d12f010c&key=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbmZvIjoie1widXNlcklkXCI6XCIxMDFcIixcImtleVwiOlwiOTBjNGI5NDI0N2FiMThmYmRiZTMyZDc4NzBkMTVjN2JcIn0ifQ.ifWlOcwmtenARlro-tf9hdLDlXjmbIa2T5AwSvRQB-M", // stylesheet location
        center: [116.4, 39.9],
        zoom: 3, // starting zoom
        minZoom: 3,
        epsg: 3857,
        doubleClickZoom: false,
      });
      let _this = this;
      // 地图加载完成  进行绘制的操作
      this.map.on("load", function () {
        window.dispatchEvent(new Event("resize"));
        that.showPop = false;
        that.$loading.hide();
        // that.getPublishDataList();
        // that.getDisasterInfoById();
        // let tempgeometry = that.getQueryGeometry();
        // that.getqueryInfoByRange(tempgeometry);
      });

      // 获取地图的层级,判断绘制类型
      this.map.on("zoom", function () {
        // 地图放大回调方法  清除热力图，绘制图框
        if (that.map.getZoom() > 2 && that.mapzoom == "on") {
          that.mapzoom = "off";
          //   let tempgeometry = that.getQueryGeometry();
          //   that.getqueryInfoByRange(tempgeometry);
        }
      });

      // 地图平移后 发送请求 进行绘制的操作
      this.map.on("dragend", function () {
        // 重新请求添加
        // let tempgeometry = that.getQueryGeometry();
        // that.getqueryInfoByRange(tempgeometry);
      });
      this.map.addControl(new mapboxgl.NavigationControl(), "top-right"); // 放大、缩小、指北针控件
    },

    imageDataStretch() {
      //线性拉伸
      let styleParam = {
        stretch: {
          kind: "percentMinimumMaximum",
          percent: 1.0,
        },
      };
      //标准差拉伸
      let styleParam2 = {
        stretch: {
          kind: "standardDeviation",
          scale: 0.1,
        },
      };
      //直方图均衡化
      let styleParam3 = {
        stretch: {
          kind: "histogramEqualize",
          percent: 1.0,
        },
      };
      this.dataPublish(styleParam);
    },
    dataPublish(styleParam) {
      let infos = [];
      for (let i = 0; i < this.publishDataTable.length; i++) {
        for (let path of this.publishDataTable[i].path) {
          let image = {
            path: path.url,
            style: styleParam,
          };
          infos.push(image);
        }
      }
      let param = {
        info: infos,
      };

      let labels = encodeURIComponent(JSON.stringify(param));
      let path = this.GlobalUrlPath.imageServerApi.imageServer + labels;

      let layer = this.map.getLayer("imageLayer");
      if (layer) {
        this.map.removeLayer("imageLayer");
      }
      let layerSource = this.map.getSource("imageLayer");
      if (layerSource) {
        this.map.removeSource("imageLayer");
      }

      this.map.addLayer({
        id: "imageLayer",
        type: "raster",
        source: {
          type: "raster",
          tiles: [path],
          tileSize: 256,
        },
        "source-layer": "imageLayer",
      });
    },
    /** 以下为绘制地图 */
    drawGeometryByCode(code, type) {
      //debugger;
      let _this = this;
      let path = this.$api.queryDealApi.queryFeatureBase64;

      let param = {
        collectionName: "area_info",
        orderColName: "",
        pageCount: 0,
        pageNum: 0,
        queryConditionList: [
          {
            compareOp: "=",
            fieldName: "type",
            fieldValue: type,
            relationNextOne: "AND",
          },
          {
            compareOp: "=",
            fieldName: "code",
            fieldValue: code,
          },
        ],
        queryResultList: ["wkb_geometry"],
      };
      let strJson = JSON.stringify(param);
      let sendData =  this.$Base64.encode(strJson);
      _this.http.postText(path, sendData).then((res) => {
        let data = res.data.data;
        if (res.data.code == 0) {
          let geometry = [];
          if (data.data.length < 1) {
            _this.$Message.info("获取范围失败");
            return;
          }

          geometry.push(data.data[0].geometry);
          _this.drawGeometry(geometry);
        } else {
          _this.$Message.error(res.data.message);
        }
      });
    },
    //根据范围渲染地图矢量范围
    drawGeometry(item) {
      let self = this;
      let geometries;
      if (item.type == "Feature") {
        let coordinates = item.geometry.coordinates;
        self.showToCenter(coordinates);
        geometries = item.geometry;
      } else if (item.type == "Polygon") {
        let coordinates = item.coordinates;
        self.showToCenter(coordinates);
        geometries = item;
      } else if (item.type == "MultiPolygon") {
        let coordinates = item.coordinates;
        self.showToCenter(coordinates);
        geometries = item;
      } else {
        let coordinates = item[0].coordinates;
        geometries = item[0];
        self.showToCenter(coordinates);
      }

      if (item.length == 0) {
        self.resetMap();
      } else {
        if (self.map.getSource("maine") != null) {
          self.map.getSource("maine").setData(geometries);
        } else {
          self.map.addSource("maine", {
            type: "geojson",
            data: {
              type: "Feature",
              geometry: geometries,
            },
          });
          self.map.addLayer({
            id: "area",
            type: "fill",
            source: "maine",
            layout: {},
            paint: {
              "fill-color": "#088",
              "fill-opacity": 0.5,
            },
          });
        }
      }
    },
    // drawGeometry(item) {
    //   let self = this;
    //   let geometries;
    //   if (item.type == "Feature") {
    //     let coordinates = item.geometry.coordinates;
    //     self.showToCenter(coordinates);
    //     geometries = item.geometry;
    //   } else {
    //     let coordinates = item[0].coordinates;
    //     geometries = item[0];
    //     self.showToCenter(coordinates);
    //   }

    //   if (item.length == 0) {
    //     self.resetMap();
    //   } else {
    //     if (self.map.getSource("maine") != null) {
    //       self.map.getSource("maine").setData(geometries);
    //     } else {
    //       self.map.addSource("maine", {
    //         type: "geojson",
    //         data: {
    //           type: "Feature",
    //           geometry: geometries,
    //         },
    //       });
    //       self.map.addLayer({
    //         id: "area",
    //         type: "fill",
    //         source: "maine",
    //         layout: {},
    //         paint: {
    //           "fill-color": "#088",
    //           "fill-opacity": 0.8,
    //         },
    //       });
    //     }
    //   }
    // },
    showToCenter(coordinates) {
      // 计算 并 移动到中心点
      let minGlobalX = 180,
        minGlobalY = 90,
        maxGlobalX = -180,
        maxGlobalY = -90;

      for (let lineDatas of coordinates) {
        for (var i = 0; i < lineDatas.length; i++) {
          let gLineData = lineDatas[i];
          if (gLineData.length <= 0) continue;
          if (gLineData.length == 2) {
            for (let j = 0; j < gLineData.length; j++) {
              if (minGlobalX > parseFloat(gLineData[0])) {
                minGlobalX = parseFloat(gLineData[0]);
              }
              if (maxGlobalX < parseFloat(gLineData[0])) {
                maxGlobalX = parseFloat(gLineData[0]);
              }
              if (minGlobalY > parseFloat(gLineData[1])) {
                minGlobalY = parseFloat(gLineData[1]);
              }
              if (maxGlobalY < parseFloat(gLineData[1])) {
                maxGlobalY = parseFloat(gLineData[1]);
              }
            }
          } else {
            for (let j = 0; j < gLineData.length; j++) {
              if (minGlobalX > parseFloat(gLineData[j][0])) {
                minGlobalX = parseFloat(gLineData[j][0]);
              }
              if (maxGlobalX < parseFloat(gLineData[j][0])) {
                maxGlobalX = parseFloat(gLineData[j][0]);
              }
              if (minGlobalY > parseFloat(gLineData[j][1])) {
                minGlobalY = parseFloat(gLineData[j][1]);
              }
              if (maxGlobalY < parseFloat(gLineData[j][1])) {
                maxGlobalY = parseFloat(gLineData[j][1]);
              }
            }
          }
        }
      }

      if (
        minGlobalX == 180 &&
        minGlobalY == 90 &&
        maxGlobalX == -180 &&
        maxGlobalY == -90
      ) {
        return;
      }

      let centerGlobalX = 0;
      let centerGlobalY = 0;
      if (maxGlobalX === -180 && minGlobalX === 180) {
        centerGlobalX = 116.4;
        centerGlobalY = 39.9;
      } else {
        centerGlobalX = (minGlobalX + maxGlobalX) / 2;
        centerGlobalY = (minGlobalY + maxGlobalY) / 2;
      }

      let centermoddle = [];
      centermoddle.push(centerGlobalX);
      centermoddle.push(centerGlobalY);
      //视图范围比数据范围大20%
      let viewWidth = 0;
      let viewHeight = 0;
      if (maxGlobalX === -180 && minGlobalX === 180) {
        viewWidth = (minGlobalX - maxGlobalX) * 1.2;
        viewHeight = (minGlobalY - maxGlobalY) * 1.2;
      } else {
        viewWidth = (maxGlobalX - minGlobalX) * 1.2;
        viewHeight = (maxGlobalY - minGlobalY) * 1.2;
      }

      let ratio = Math.sqrt(Math.sqrt(Math.sqrt(2))); //视图范围每扩大或缩小ratio倍，缩放等级对应减少或增加0.125

      let indexX = 6; //初始缩放等级为7
      let zoomBaseX = 5.96; //缩放等级为7时，经度范围为5.96
      if (viewWidth > zoomBaseX) {
        //如果实际范围比基准范围大，基准范围按比例扩大，直至大于实际范围，获取此时缩放等级
        while ((zoomBaseX = zoomBaseX * ratio) < viewWidth) {
          indexX -= 0.125;
        }
      } else {
        //如果实际范围比基准范围小，基准范围按比例缩小，直至小于实际范围，获取此时缩放等级
        while ((zoomBaseX = zoomBaseX / ratio) > viewWidth) {
          indexX += 0.125;
        }
      }

      let indexY = 6; //初始缩放等级为7
      let zoomBaseY = 1.91; //缩放等级为7时，纬度范围为1.91
      if (viewHeight > zoomBaseY) {
        while ((zoomBaseY = zoomBaseY * ratio) < viewHeight) {
          indexY -= 0.125;
        }
      } else {
        while ((zoomBaseY = zoomBaseY / ratio) > viewHeight) {
          indexY += 0.125;
        }
      }

      //在经纬度分别获取的缩放等级中，获取比较小的值作为缩放等级，确保数据能完全显示
      let index = indexX < indexY ? indexX : indexY;
      this.map.flyTo({
        center: centermoddle,
        zoom: index, // 缩放比例
      });
    },
    //解析region字符串，获取数据框坐标点
    parseRegionStr(regionStr) {
      if (!regionStr) return [];
      let region = regionStr.substr(
        regionStr.indexOf("(") + 2,
        regionStr.indexOf(")")
      );
      let regionList = region.split(",");
      let regionData = [];

      for (let i = 0; i < regionList.length; i++) {
        let coordinate = regionList[i].split(" ");
        if (coordinate.length > 1) {
          regionData.push([
            parseFloat(coordinate[0]),
            parseFloat(coordinate[1]),
          ]);
        }
      }
      return regionData;
    },
    //绘制数据框
    drawDataFrame() {
      //清理数据框
      if (this.map.getLayer("GreenLineId")) {
        this.map.removeLayer("GreenLineId");
      }
      if (this.map.getSource("greenline")) {
        this.map.removeSource("greenline");
      }

      // 绿框的数据源
      let _Greengeojson = {
        type: "FeatureCollection",
        features: [],
      };

      for (let lineData of this.globalLineData) {
        let _tempFeature = {
          type: "Feature",
          epsg: 3857,
          properties: {
            valuecolor: "#ff0000",
          },
          geometry: {
            type: "Polygon",
            coordinates: [lineData],
          },
        };
        _Greengeojson.features.push(_tempFeature);
      }

      // 2--绿色
      this.map.addSource("greenline", {
        type: "geojson",
        data: _Greengeojson,
      });
      this.map.addLayer({
        id: "GreenLineId",
        type: "line",
        source: "greenline",

        layout: {},
        paint: {
          "line-color": "green",
          "line-width": 1,
          "line-opacity": 0.8,
        },
      });

      let coordinates = [];
      coordinates.push(this.globalLineData);
      this.showToCenter(coordinates);
    },
    //缩略图点击事件
    tumbInfoClicked(row) {
      //debugger
      let layerId = row.dataId + "_image";
      if (!this.map.getLayer(layerId)) {
        let tempImageCoordinate = []; //绘制缩略图需要四个点坐标   绘制矩形框需要5个点坐标
        for (let i = 0; i < row.region.length - 1; i++) {
          tempImageCoordinate[i] = row.region[i];
        }

        this.map.addLayer({
          id: layerId,
          source: {
            type: "image",
            url: row.tumbUrl,
            coordinates: tempImageCoordinate,
          },
          type: "raster",
        });
        //this.showToCenter(row.region);
      } else {
        this.map.removeLayer(layerId);
        if (this.map.getSource(layerId)) {
          this.map.removeSource(layerId);
        }
      }
    },

    removeLayer(layerId) {
      let layer = this.map.getLayer(layerId);
      if (layer) {
        this.map.removeLayer(layerId);
      }
      let layerSource = this.map.getSource(layerId);
      if (layerSource) {
        this.map.removeSource(layerId);
      }
    },
    /** 以上为绘制地图 */
    /** 新增数据拷贝功能 */
    dataCopy() {
      this.isLoading = true;
      let pathCopy = "/pie/data/wx01wxyg102/01/searchdata/定期全国影像镶嵌"; //拷贝路径  统一值

      let path = this.$api.queryDealApi.dataCopy;
      let dataIdCopy = "";
      for (let i = 0; i < this.allDataTableDataList.length; i++) {
        dataIdCopy = dataIdCopy + this.allDataTableDataList[i].dataId + ",";
      }
      dataIdCopy = dataIdCopy.slice(0, dataIdCopy.length - 1);
      let param = {
        dataId: dataIdCopy,
        savePath: pathCopy,
      };

      this.http.post(path, param).then((res) => {
        if (res.data.code == 200) {
          this.$Message.success(res.data.message);
          this.isLoading = false;
        } else {
          this.$Message.error(res.data.message);
          this.isLoading = false;
        }
      });
    },

    /** 以下为数据导出相关 */
    selectWorkFlow() {
      this.SelectWorkFlowModal = true;
      this.getProcessingData();
    },

    SelectWorkFlowOk() {
      let path = this.$api.queryDealApi.disasterDataWorkFlowProduct;

      if (this.dataIds.length <= 0) {
        this.$Message.error("请先选择数据!!");
        return;
      }
      //debugger;
      let user = this.$store.state.user;
      let userId = user.userId;
      let param = {
        dataList: this.dataIds,
        flowId: this.selectFlowID,
        regionCode: this.regionCode,
        userId: userId,
      };
      this.http.post(path, param).then((res) => {
        if (res.data.code == 200) {
          this.$Message.success("开始执行.....");
          this.SelectWorkFlowModal = false;
        } else {
          this.$Message.error("执行失败！");
        }
      });
    },
    SelectWorkFlowCancel() {
      this.SelectWorkFlowModal = false;
    },
    // dataExportSelect() {
    //   this.dataExportZtreeModal = true;
    //   //1 共享 2 用户 3 推送任务扫描
    //   let path = this.GlobalUrlPath.processProduct.fileRootPath + 1;
    //   this.exportDataMenuSetting(path);
    // },
    // exportDataMenuSetting(urlPath) {
    //   let checkType = { Y: "", N: "" }; //父与子的关联去掉
    //   let setting = {
    //     check: {
    //       enable: true,
    //       nocheckInherit: false,
    //       chkboxType: checkType,
    //     },
    //     data: {
    //       simpleData: {
    //         enable: true,
    //       },
    //     },
    //     callback: {
    //       beforeClick: this.beforeClick,
    //       onClick: this.zTreeOnClick,
    //       // onCheck: this.zTreePushTaskOnCheck,
    //       onExpand: this.zTreeOnClick,
    //     },
    //   };

    //   this.http.get(urlPath).then((res) => {
    //     let data = res.data;
    //     if (data.success == true) {
    //       $.fn.zTree.init($("#dataExportTree"), setting, data.data);
    //     }
    //   });
    // },
    // dataExportMenuOk() {
    //   let treeObj = $.fn.zTree.getZTreeObj("dataExportTree"),
    //     nodes = treeObj.getCheckedNodes(true);
    //   let tempNode = "";
    //   for (var index in nodes) {
    //     tempNode = nodes[index];
    //     this.dataExportDir = tempNode.id;
    //   }

    //   this.dataExportReset();
    // },
    // dataExportMenuCancel() {
    //   this.dataExportZtreeModal = false;
    // },
    // dataExportReset() {
    //   var treeObj;
    //   this.dataExportZtreeModal = false;
    //   treeObj = $.fn.zTree.getZTreeObj("dataExportTree");
    //   if (treeObj == null) return;

    //   var nodes = treeObj.getNodes();
    //   for (var i = nodes.length - 1; i >= 0; i--) {
    //     treeObj.removeNode(nodes[i]);
    //   }
    // },
    /** 以上为数据导出相关 */

    /* 以下为影像发布相关 */
    // 选择影像目录Ztree设置
    publishDataMenuSetting(urlPath) {
      let checkType = { Y: "", N: "" }; //父与子的关联去掉
      let setting = {
        check: {
          enable: true,
          nocheckInherit: false,
          chkboxType: checkType,
        },
        data: {
          simpleData: {
            enable: true,
          },
        },
        callback: {
          beforeClick: this.beforeClick,
          onClick: this.zTreeOnClick,
          // onCheck: this.zTreePushTaskOnCheck,
          onExpand: this.zTreeOnClick,
        },
      };

      this.http.get(urlPath).then((res) => {
        let data = res.data;
        if (data.success == true) {
          $.fn.zTree.init($("#dataPublishTree"), setting, data.data);
        }
      });
    },
    dataPublishReset() {
      var treeObj;
      treeObj = $.fn.zTree.getZTreeObj("dataPublishTree");
      if (treeObj == null) return;

      var nodes = treeObj.getNodes();
      for (var i = nodes.length - 1; i >= 0; i--) {
        treeObj.removeNode(nodes[i]);
      }
    },
    dataPublish2() {
      this.publishData = [];
      this.publishName = "";
      this.publishDesc = "";
      this.dataPublishModal = true;

      //1 共享 2 用户 3 推送任务扫描
      let path = this.GlobalUrlPath.processProduct.fileRootPath + 1;
      this.publishDataMenuSetting(path);
    },
    dataPublishOk() {
      let self = this;

      if (self.publishName == "") {
        this.$Message.warning("发布名称不能为空！");
        return;
      }

      let treeObj = $.fn.zTree.getZTreeObj("dataPublishTree"),
        nodes = treeObj.getCheckedNodes(true);
      let tempNode = "";
      for (var index in nodes) {
        tempNode = nodes[index];
        this.publishData.push(tempNode.id);
      }

      this.dataPublishReset();

      let styleParam = {};
      this.dataPublish(styleParam);
      this.dataPublishModal = false;

      let path = this.GlobalUrlPath.imagePublish.save;
      let param = {
        name: self.publishName,
        description: self.publishDesc,
        urls: self.publishData,
      };
      self.http.post(path, param).then((res) => {
        if (res.data.code == 200) {
          //this.getPublishDataList();
          //console.log("添加发布影像成功！");
        }
      });
    },
    dataPublishCancel() {
      this.dataPublishModal = false;
    },
    getPublishDataList() {
      let self = this;
      let path = this.GlobalUrlPath.imagePublish.queryPublishList;
      let param = {
        name: "",
        createTime: "",
        pageNum: "",
        pageSize: "",
      };

      this.http.get(path, param).then((res) => {
        if (res.data.code == 200) {
          let content = res.data.data;
          self.publishDataTable = [];

          for (let i = 0; i < content.length; i++) {
            let name = content[i].name;
            let isExist = false;
            for (let publishData of self.publishDataTable) {
              if (publishData.name == name) {
                isExist = true;
                publishData.path.push({
                  id: content[i].id,
                  url: content[i].url,
                });
              }
            }
            if (!isExist) {
              self.publishDataTable.push({
                name: content[i].name,
                description: content[i].description,
                userId: content[i].userId,
                createTime: content[i].createTime,
                updateTime: content[i].updateTime,
                path: [
                  {
                    id: content[i].id,
                    url: content[i].url,
                  },
                ],
              });
            }
          }

          self.allNum2 = self.publishDataTable.length;
          self.total2 = Math.ceil(
            self.publishDataTable.length / self.pageSize2
          );

          for (let i = 0; i < self.publishDataTable.length; i++) {
            self.publishDataTable[i].number =
              self.pageSize2 * (self.currentPage2 - 1) + i + 1;
          }

          let styleParam = {};
          self.dataPublish(styleParam);
        }
      });
    },
    getInfo(item) {
      let self = this;
      self.curItem = item;

      let path = self.GlobalUrlPath.info.userOne + "/" + item.userId;
      $.ajax({
        type: "GET",
        async: false, // fasle同步，true异步
        headers: { Authorization: self.$store.state.user.token },
        contentType: "application/json;charset=UTF-8",
        url: path,
        success: function (res) {
          if (res.code == 0) {
            self.curItem.userName = res.data.username;
          }
        },
        error: function (e) {
          console.log(e.status);
        },
      });

      self.publishPathTable = item.path;
      self.publishDataInfoShow = true;
    },
    del(item) {
      this.curItem = item;
      this.delShow = true;
    },
    delCancel() {
      this.delShow = false;
      this.bDelOptimizationData = false;
    },
    delOk() {
      let self = this;
      let tempPaths = null;

      if (this.bDelOptimizationData) {
        let item = this.currentOptimizationData;
        let path =
          this.GlobalUrlPath.sthxTaskTaskInfo.delImageFilterById + item.taskId;
        this.http.delete(path).then((res) => {
          if (res.data.code == 200) {
            this.$Message.success("删除成功！");
            this.lookDetail();
          }
        });
      } else {
        for (let publishData of self.publishDataTable) {
          if (publishData.name == self.curItem.name) {
            tempPaths = publishData.path;
          }
        }

        for (let tempPath of tempPaths) {
          let path =
            self.GlobalUrlPath.imagePublish.deletePublished + tempPath.id;
          $.ajax({
            type: "DELETE",
            async: false, // fasle同步，true异步
            headers: { Authorization: self.$store.state.user.token },
            contentType: "application/json;charset=UTF-8",
            url: path,
            success: function (res) {
              if (res.success) {
                console.log("删除成功！");
              }
            },
            error: function (e) {
              console.log(e.status);
            },
          });
        }

        this.getPublishDataList();
        this.$Message.success("删除成功！");
      }
      this.delShow = false;
    },
    delPath(item) {
      let self = this;
      let path = self.GlobalUrlPath.imagePublish.deletePublished + item.id;

      self.http.delete(path).then((res) => {
        if (res.data.code == 200) {
          for (let i = 0; i < this.publishPathTable.length; i++) {
            if (this.publishPathTable[i].id == item.id) {
              this.publishPathTable.splice(i, 1);
              break;
            }
          }
          console.log("删除成功！");
        } else {
          console.log("删除失败：" + res.data.message);
        }
      });
    },
    infoCancel() {
      this.publishDataInfoShow = false;
      this.getPublishDataList();
    },
    infoOk() {
      this.publishDataInfoShow = false;
      this.getPublishDataList();
    },
    /* 以上为影像发布相关 */

    /** 以下为数据优选相关 */
    // startExcute() {
    //   if (
    //     this.dropPicPath == undefined ||
    //     this.rangeShpPath == undefined ||
    //     this.selectShpPath == undefined
    //   ) {
    //     this.$Message.warning("参数不全，请重新选择参数!!");
    //     return;
    //   }
    //   let path = this.GlobalUrlPath.sthxTaskTaskInfo.imageFilterExecute;
    //   let param = {
    //     DropPath: this.dropPicPath,
    //     RangePath: this.rangeShpPath,
    //     Resolution: this.resStatus,
    //     Priority: this.OptimizationRules,
    //     OutputDrop: this.selectShpPath,
    //   };
    //   this.http.post(path, param).then((res) => {
    //     if (res.data.code == 200) {
    //       this.$Message.success("执行成功！");
    //     } else {
    //       this.$Message.error("执行失败！");
    //     }
    //   });
    // },
    // lookDetail() {
    //   this.OptimizationDataModalShow = true;
    //   let path = this.GlobalUrlPath.sthxTaskTaskInfo.queryImageFilter;
    //   let param = {
    //     pageNum: this.currentPage3,
    //     pageSize: this.pageSize3,
    //   };
    //   this.http.get(path, param).then((res) => {
    //     if (res.data.code == 200) {
    //       let resData = res.data.data;
    //       this.OptimizationDataTable = [];
    //       for (let i = 0; i < resData.length; i++) {
    //         let status = resData[i].status;
    //         if (status == "IN_PROGRESS") {
    //           status = "执行中..";
    //         } else if (status == "COMPLETED") {
    //           status = "已完成";
    //         } else if (status == "FAILED") {
    //           status = "执行失败";
    //         }
    //         this.OptimizationDataTable.push({
    //           id: i + 1,
    //           dataExportPath: resData[i].exportUrl,
    //           createTime: resData[i].createTime,
    //           status: status,
    //           taskId: resData[i].id,
    //         });
    //       }

    //       this.allNum3 = res.data.total;
    //       this.total3 = Math.ceil(res.data.total / this.pageSize3);

    //       for (let i = 0; i < res.data.total; i++) {
    //         this.OptimizationDataTable[i].number =
    //           this.pageSize3 * (this.currentPage3 - 1) + i + 1;
    //       }
    //     }
    //   });
    // },
    // OptimizationDataOk() {
    //   this.OptimizationDataModalShow = false;
    // },
    // OptimizationDataCancel() {
    //   this.OptimizationDataModalShow = false;
    // },
    // getOptimizationData(item) {},
    // delOptimizationData(item) {
    //   this.bDelOptimizationData = true;
    //   this.currentOptimizationData = item;
    //   this.delShow = true;
    // },
    /** 以上为数据优选相关 */
  },
};
</script>
<style scoped>
/* spin 加载中... */
/* 旋转效果 */
.demo-spin-icon-load {
  animation: ani-demo-spin 1s linear infinite;
}
@keyframes ani-demo-spin {
  from {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(180deg);
  }
  to {
    transform: rotate(360deg);
  }
}
/* 遮罩 */
/* 假如内容过长，一屏放不下，滚动条下拉覆盖不全 */
.ivu-spin-fix {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 8;
  width: 100%;
  height: 100%;
  background-color: hsla(0, 0%, 100%, 0.8);
}
/* spin 加载中... */

.saveFileStyle {
  width: 280px;
}
/** 以下为表格分页 */
.footerPage {
  display: flex;
  justify-content: flex-end;
  cursor: pointer;
  color: black;
}
.pageContent {
  margin-right: 26px;
  font-size: 14px;
}
.selectStyle {
  display: inline-block;
  width: 100px;
  margin-right: 5px;
}
.page-link {
  cursor: pointer;
}
/** 以上为表格分页 */

.treeDiv {
  height: 500px;
  width: 760px;
  overflow-y: auto;
}

.card-body {
  margin-top: -65px;
  padding: 0.75rem 0;
}

/* @media screen and (min-height: 1200) {
  .timeselect {
    position: relative;
    top: -80% !important;
  }
} */

/* @media screen and (min-height: 1080) {
  .timeselect {
    position: relative;
    top: -80% !important;
  }
} */

.timeselect {
  position: absolute;
  float: left;
  width: 23%;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  top: 4%;
}

/** 以下标签页风格 */
/* .demo-tabs-style1 >>>.ivu-tabs-card > .ivu-tabs-content {
   height: auto;
  margin-top: -16px; 
  height: calc(100vh - 170px);
    overflow-y: auto;
    overflow-x: hidden;
} */

.task-monitorTable-row {
  margin-top: 0px;
  /* background: rgba(255, 255, 255, 1); */
}

.regionBlock {
  display: flex;
  margin-top: 66px;
  margin-left: -123px;
}

.tab-header {
  position: relative;
  top: 10px;

  width: 100%;
  display: flex;
  border-bottom: 1px solid rgba(221, 228, 237, 1);
}
.pickstyle {
  margin-top: 2px;
  background-color: rgb(255, 255, 255);
  border: 0px solid #fff;
}

.regionCas {
  background: white;
}

.cloudPercent > .ivu-slider-input .ivu-input-number {
  float: right;
  margin-top: 0px;
}
/* .pickstyle >>> ::-webkit-input-placeholder {
  color: #3f3c3c !important;
}
.pickstyle >>> ::-moz-input-placeholder {
  color: #5f5c5c !important;
}
.pickstyle >>> ::-ms-input-placeholder {
  color: #5f5c5c !important;
} */
/** 以上标签页风格 */

/** 以下为显示隐藏风格 */
/* .fade-enter-active, .fade-leave-active {
  transition: opacity .5s;
}
.fade-enter, .fade-leave-to {
  opacity: 0;
} */
.fade-enter-active {
  transition: all 0.3s ease;
}
.fade-leave-active {
  transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
}
.fade-enter, .slide-fade-leave-to
/* .slide-fade-leave-active for below version 2.1.8 */ {
  transform: translateX(-100px);
  opacity: 0;
}
/** 以上为显示隐藏风格 */

/** 传感器部分样式 */
.imagestyle {
  width: 20px;
  height: 20px;
  margin-left: 10px;
}
.cinputselectstyle1 {
  width: 100%;
  height: 35px;
  line-height: 35px;
  font-weight: bolder;
  background: rgb(241, 244, 249);
  /* margin-top:21px; */
  /* margin-left:35px; */
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}
/** 传感器部分样式 */

.queryMapoperate {
  display: inline-grid;
  position: absolute;
  z-index: 2;
  width: auto;
  height: auto;
  margin-left: 20px;
  top: 135px;
  right: 22px;
  border-radius: 5px;
}
.dataStretch {
  height: 30px;
  width: 30px;
  float: left;
  background: rgb(255 255 255 / 1);
  color: #d0d0d0;
  border-radius: 5px;
  padding: 0px;
}
.py-2 {
  display: flex;
  border: none;
}
.delAnniu {
  background-color: gray !important;
  border-color: gray !important;
}
.delAnniu:hover {
  background-color: rgb(187, 177, 177) !important;
  border-color: gray !important;
}
.labelPublishDesc,
.labelPublishName {
  width: 300px;
  align-self: center;
  margin-left: 20px;
}
.labelSelectImage {
  width: 300px;
  align-self: center;
  margin-left: 25px;
  margin-bottom: 10px;
}
.inputstyle {
  width: 300%;
  margin-bottom: 5px;
}
</style>
<style lang="scss">
.ivu-slider-input .ivu-input-number {
  margin-top: 0px;
}
</style>

<style lang="less">
.dpMapQueryControllWrapper {
  margin: 11px 12px;
  #dataQueryDqmap {
    width: 100% !important;
    height: calc(~"100vh - 100px");
    position: relative;
    border: 0px solid #ddd;
    border-top: none;
  }
  .ivu-modal-mask /deep/ {
    z-index: 2000 !important;
  }
  .ivu-modal-wrap /deep/ {
    z-index: 2000 !important;
  }
  .ivu-form-item {
    margin-left: 10px;
  }
  .ivu-form-item-label {
    color: black;
  }
}
.btn-info1 {
  color: #fff;
  background-color: #3c6ef0;
  border-color: #3c6ef0;
  height: 40px;
  // width: 90px;
}
</style>

